home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib / c / atexit.man < prev    next >
Encoding:
Text File  |  1989-03-22  |  1.4 KB  |  42 lines

  1. ' Copyright 1989 Regents of the University of California
  2. ' Permission to use, copy, modify, and distribute this
  3. ' documentation for any purpose and without fee is hereby
  4. ' granted, provided that this notice appears in all copies.
  5. ' The University of California makes no representations about
  6. ' the suitability of this material for any purpose.  It is
  7. ' provided "as is" without express or implied warranty.
  8. ' $Header: /sprite/src/lib/c/stdlib/RCS/atexit.man,v 1.1 89/01/05 18:00:22 ouster Exp $ SPRITE (Berkeley)
  9. .so \*(]ltmac.sprite
  10. .HS atexit cmds
  11. .BS
  12. .SH NAME
  13. atexit \- Register procedure to be invoked before process exits
  14. .SH SYNOPSIS
  15. .nf
  16. \fB#include <stdlib.h>
  17.  
  18. \fBint
  19. atexit(\fIfunc\fB)\fR
  20. .SH ARGUMENTS
  21. .AP void *func() in
  22. Procedure to call just before process exits.
  23. .BE
  24.  
  25. .SH DESCRIPTION
  26. .PP
  27. \fBAtexit\fR may be used to register the procedure \fIfunc\fR, such
  28. that \fIfunc\fR will be invoked by the \fBexit\fR procedure before
  29. the process exits.  \fIFunc\fR will only be called if the \fBexit\fR
  30. procedure is invoked:  if the process terminates because of a signal,
  31. or if the process bypasses \fBexit\fR by calling \fB_exit\fR, then \fIfunc\fR
  32. will not be invoked.
  33. \fIFunc\fR takes no arguments and returns no result.
  34. .PP
  35. The normal return value from \fBatexit\fR is 0.  If the registration
  36. fails then a non-zero value is returned.
  37. .DE
  38. .SH KEYWORDS
  39. exit, handler, register
  40.